import { prop } from '@typegoose/typegoose';
import { EntityModel } from '@midwayjs/typegoose';
import { EntityBase } from '../entityBase';
import { DEFAULT_ID } from '../constant/entity';

@EntityModel()
export class Dept extends EntityBase {
    @prop({ required:true })
    public name: string;

    @prop({ default: DEFAULT_ID })
    public parent_id: string;
}